﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DataAccess
{
 public   class GlobalConfiguration
 {
     private static int pageSize;

     public static int PageSize
     {
         get { return pageSize; }
     }

     private static string siteName;

     public static string SiteName
     {
         get { return siteName; }
     }

     private static int descriptionLength;

     public static int DescriptionLength
     {
         get { return descriptionLength; }
     }
     private static int imagesPerPage;
     public static int ImagesPerPage
     {
         get { return imagesPerPage; }
     }
     public static int CartPersistDays
     {
         get
         {
             return int.Parse(ConfigurationManager.AppSettings["CartPersistDays"]);
         }
     }
     static GlobalConfiguration()
     {
         pageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
         descriptionLength = Convert.ToInt32(ConfigurationManager.AppSettings["DesLength"]);
         siteName = ConfigurationManager.AppSettings["SiteName"];
         imagesPerPage = Convert.ToInt32(ConfigurationManager.AppSettings["ImagesPerPage"]);
     }


     public static string ConnectionString { get; set; }
 }
}
